<script language="javascript">
	function back(){
		document.location="<?php echo site_url("/cuti_mahasiswa/index/" . $id); ?>";
	}
</script>
<?php
echo form_open("/cuti_mahasiswa/form_cuti/" . $id . "/" . $parameter, array("name"=>"form_cuti","id"=>"medic_form"));
if($parameter == FALSE){
	$semester	= set_value("semester");
	$tahun	= set_value("tahun");
	$ket	= set_value("ket");
} else {
	$semester	= $value["SEMESTER"];
	$tahun	= $value["ID_TAHUN_AJARAN"];
	$ket	= $value["KETERANGAN"];
}
?>
<p>
	<label>Tahun</label>
	<select name="tahun" id="tahun">
		<option value="">-- Pilih Tahun Ajaran--</option>
		<?php
		foreach($qt_ajaran as $row){
		?>
		<option value="<?php echo $row["ID_TAHUN_AJARAN"]; ?>" <?php echo ($tahun == $row["ID_TAHUN_AJARAN"]) ? ("selected") : (""); ?>><?php echo $row["TAHUN_AJARAN"]; ?></option>
		<?php
		}
		?>
	</select>
	<?php echo form_error("tahun"); ?>
</p>
<p>
	<label>Semester</label>
	<p><input type="radio" name="semester" <?php echo $semester == 1 ? "checked" : ""; ?> value="1"> Ganjil<p>
	<p><input type="radio" name="semester" <?php echo $semester == 2 ? "checked" : ""; ?> value="2"> Genap</p>
	<?php echo form_error("semester"); ?>
</p>
<p>
	<label>Keterangan</label>
	<textarea name="ket"><?php echo $ket; ?></textarea>
	<?php echo form_error("ket"); ?>
</p>
<p>
	<input type="submit" class="btn btn-primary" id="submit" value="Simpan">
	<input type="reset" class="btn btn-primary" id="submit" value="Reset">
	<input type="button" class="btn btn-primary" id="submit" value="Kembali" onClick="back()">
</p>
<?php echo form_close(); ?>